3.258 \(\int \frac{1}{-c-d+(c-d) x^2} \, dx\)

Optimal. Leaf size=37 \[ -\frac{\tanh ^{-1}\left (\frac{x \sqrt{c-d}}{\sqrt{c+d}}\right )}{\sqrt{c-d} \sqrt{c+d}} \]

[Out]

-(ArcTanh[(Sqrt[c - d]*x)/Sqrt[c + d]]/(Sqrt[c - d]*Sqrt[c + d]))

________________________________________________________________________________________

Rubi [A]  time = 0.0326792, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.056, Rules used = {208} \[ -\frac{\tanh ^{-1}\left (\frac{x \sqrt{c-d}}{\sqrt{c+d}}\right )}{\sqrt{c-d} \sqrt{c+d}} \]

Antiderivative was successfully verified.

[In]

Int[(-c - d + (c - d)*x^2)^(-1),x]

[Out]

-(ArcTanh[(Sqrt[c - d]*x)/Sqrt[c + d]]/(Sqrt[c - d]*Sqrt[c + d]))

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{-c-d+(c-d) x^2} \, dx &=-\frac{\tanh ^{-1}\left (\frac{\sqrt{c-d} x}{\sqrt{c+d}}\right )}{\sqrt{c-d} \sqrt{c+d}}\\ \end{align*}

Mathematica [A]  time = 0.0157183, size = 44, normalized size = 1.19 \[ \frac{\tan ^{-1}\left (\frac{x \sqrt{c-d}}{\sqrt{-c-d}}\right )}{\sqrt{-c-d} \sqrt{c-d}} \]

Antiderivative was successfully verified.

[In]

Integrate[(-c - d + (c - d)*x^2)^(-1),x]

[Out]

ArcTan[(Sqrt[c - d]*x)/Sqrt[-c - d]]/(Sqrt[-c - d]*Sqrt[c - d])

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 33, normalized size = 0.9 \begin{align*} -{{\it Artanh} \left ({ \left ( c-d \right ) x{\frac{1}{\sqrt{ \left ( c+d \right ) \left ( c-d \right ) }}}} \right ){\frac{1}{\sqrt{ \left ( c+d \right ) \left ( c-d \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-c-d+(c-d)*x^2),x)

[Out]

-1/((c+d)*(c-d))^(1/2)*arctanh((c-d)*x/((c+d)*(c-d))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.29292, size = 217, normalized size = 5.86 \begin{align*} \left [\frac{\log \left (\frac{{\left (c - d\right )} x^{2} - 2 \, \sqrt{c^{2} - d^{2}} x + c + d}{{\left (c - d\right )} x^{2} - c - d}\right )}{2 \, \sqrt{c^{2} - d^{2}}}, \frac{\sqrt{-c^{2} + d^{2}} \arctan \left (\frac{\sqrt{-c^{2} + d^{2}} x}{c + d}\right )}{c^{2} - d^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x^2),x, algorithm="fricas")

[Out]

[1/2*log(((c - d)*x^2 - 2*sqrt(c^2 - d^2)*x + c + d)/((c - d)*x^2 - c - d))/sqrt(c^2 - d^2), sqrt(-c^2 + d^2)*
arctan(sqrt(-c^2 + d^2)*x/(c + d))/(c^2 - d^2)]

________________________________________________________________________________________

Sympy [B]  time = 0.212743, size = 87, normalized size = 2.35 \begin{align*} \frac{\sqrt{\frac{1}{\left (c - d\right ) \left (c + d\right )}} \log{\left (- c \sqrt{\frac{1}{\left (c - d\right ) \left (c + d\right )}} - d \sqrt{\frac{1}{\left (c - d\right ) \left (c + d\right )}} + x \right )}}{2} - \frac{\sqrt{\frac{1}{\left (c - d\right ) \left (c + d\right )}} \log{\left (c \sqrt{\frac{1}{\left (c - d\right ) \left (c + d\right )}} + d \sqrt{\frac{1}{\left (c - d\right ) \left (c + d\right )}} + x \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x**2),x)

[Out]

sqrt(1/((c - d)*(c + d)))*log(-c*sqrt(1/((c - d)*(c + d))) - d*sqrt(1/((c - d)*(c + d))) + x)/2 - sqrt(1/((c -
 d)*(c + d)))*log(c*sqrt(1/((c - d)*(c + d))) + d*sqrt(1/((c - d)*(c + d))) + x)/2

________________________________________________________________________________________

Giac [A]  time = 2.75656, size = 45, normalized size = 1.22 \begin{align*} \frac{\arctan \left (\frac{c x - d x}{\sqrt{-c^{2} + d^{2}}}\right )}{\sqrt{-c^{2} + d^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-c-d+(c-d)*x^2),x, algorithm="giac")

[Out]

arctan((c*x - d*x)/sqrt(-c^2 + d^2))/sqrt(-c^2 + d^2)